package com.sakura.cherish.springboot.mybatis.practice.controller;

import com.sakura.cherish.springboot.mybatis.practice.core.IUser;
import com.sakura.cherish.springboot.mybatis.practice.model.UserModel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Slf4j
@RequestMapping("/user")
public class UserController {
    @Autowired
    private IUser user;

    @GetMapping(value = "/getUser")
    public UserModel getUser(@RequestParam("name") String name) {
        return user.getUser(name);
    }
}
